package com.easytodo.entity;

import lombok.Data;

@Data
public class Item implements Comparable<Item>
{
    private Integer id;
    private String title;
    private Long deathLine;
    private Long needTime;
    private String importance;
    private String remarks;
    private String process;
    private String path;

    @Override
    public int compareTo(Item item) {
        Integer me=Integer.valueOf(getImportance());
        Integer he=Integer.valueOf(item.getImportance());
        if(me>he)
            return -1;
        if(me<he)
            return 1;
        return 0;
    }

}